package com.twu.biblioteca;

public class Movie {
    private int number;
    private String name;
    private int year;
    private String director;
    private int rating;

    public Movie(int number, String name, int year, String director, int rating) {
        this.number = number;
        this.name = name;
        this.year = year;
        this.director = director;
        this.rating = rating;
    }

    public int getNumber() {
        return number;
    }

    public String getName() {
        return name;
    }

    public int getYear() {
        return year;
    }

    public String getDirector() {
        return director;
    }

    public int getRating() {
        return rating;
    }

    public void printInformation() {
        System.out.println(String.format("%6d    %-30s    %4d    %-20s    %6s\n", getNumber(), getName(), getYear(), getDirector(), getRating() == -1 ? "" : String.valueOf(getRating())));
    }
}
